<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="<%=path %>/static/css/css.css?1" />
<link rel="stylesheet" type="text/css" href="<%=path %>/static/jquery-ui/jquery-ui.min.css" />
<script type="text/javascript" src="<%=path %>/static/js/json2.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/static/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="<%=path %>/static/layer/layer.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/gridview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/formview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/tool.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/validate.js"></script>
<script type="text/javascript" src="<%=path %>/wechat/js/copy/ZeroClipboard.js"></script>
<SCRIPT type="text/javascript">
    <!--
	var gridSetting = {
			id:'TaskCentreGrid',
			po:"QhTaskCentre",
			title:'任务中心列表',
			height:'auto',
			service:"uiServices!listSimple",
			tbId:"TaskTb",
			pageInfo: {
				records: 12,//auto表示根据容器高度自动判断
				orderby : "createDateTime"
			},
			oper:{
                isDisplay:true,
            	operName:"",
            	url:"",
            	cssClass:"Operation",
            	width:120
            },
			fields:[
			   {	name:'id',
					hide:true
			   },
               {
                   name: 'title',
                   descs:"标题"
               },
               {
                   name: 'cashMoney',
                   descs:"金额",
                   align:"center"
               },
               {
                   name: 'type',
                   descs:"类别",
                   align:"center"
               },
               {
                   name: 'createDateTime',
                   descs:"创建时间",
                   thstyle:"width:160px;"
               }
			],
			toolbar:{align:'right',buttons:[
            {
            		                 			    	 id:'save',
            		                 			    	 title:'新增',
            		                 			    	 handlers:{
            		                 			    		 click: function(){
                                                                   location.href="/qh/public/common/r2.htmls?page=ranking/task_centre_edit";
            		                 			    		 }
            		                 			    	 }
            		                 			     },
            		                 		 {
            		                 			    	 id:'delete',
            		                 			    	 title:'删除',
            		                 			    	 handlers:{
            		                 			    		 click: function(){
            		                 			    			 grid.deletes("deleteMappedRoleNavis",function(ret){
            		                 			    				 if(ret==-1){
            		                 			    					 layer.msg("删除失败，请重试！");
            		                 			    				 }else{
            		                 			    					 layer.msg("删除" + ret.recordNum + "条记录！",function(ret){
            		                 			    						 grid.reload();
            		                 			    					 });
            		                 			    				 }
            		                 			    			 });

            		                 			    		 }
            		                 			    	 }
            		                 			     }
            		                 		]}
		};
	var grid,form0;
    $(document).ready(function(){
    	grid = new GridView("list",gridSetting,"list");
		grid.init();
		var data = [];

		grid.load({data:data});

		ajustHeight();
    });

    function afterLoad_TaskTb(){
       $(".rcon2 .mtable tbody tr").each(function(){
          var id=$(this).attr("recordid");
          var html="<a href=<%=path %>/public/common/r2.htmls?page=ranking/task_centre_edit&id="+id+" >编辑</a>";
          $(this).find(".Operation").html(html);
       });
    }

    //-->
</SCRIPT>
</head>

<body>

<div id="formview" class="rbox1"></div>
<div id="list" class="rbox2"></div>
<script type="text/javascript" src="<%=path %>/static/js/underscore.js"></script>
<script type='text/javascript' src='<%=path %>/static/My97DatePicker/WdatePicker.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/interface/BaseDwr.js'></script>
</body>
</html>